The ROS (robot operating system) uses shared memory communication which differs from the conventional communication in that: rapid transmission of messages is achieved by continuously requesting new shared memory areas, thereby achieving a low-latency control channel and a high-throughput data channel, and improving the operating efficiency of the system.
At present, the ROS utilizes an automatic memory deallocating method. The system will automatically determine whether or not to deallocate the memory, after the node process stops working. When all associations of an object are cut off and the object have not been changed to be in an accessible state after the system performs a resource cleanup, the object will lose the reference permanently and become an inaccessible state. Then, the system will actually deallocate the memory resource occupied by the object.
However, there are many problems in the automatic memory deallocating method. If the inaccessible memory is not cleaned timely due to some unusual reasons, this will result in a significant resource waste, influence the execution efficiency of other modules, and even cause the entire system to breakdown.